#include<stdio.h>
int ban(int s[],int len,int count,int key){
	int ss[100];
	int j=1;
	if(len==0)
	  return -1;
	if(s[(len+1)/2]==key)
	  return count;
	if(s[(len+1)/2]>key)
	{ for(int i=1;i<(len+1)/2;i++)
	   {
	   ss[j++]=s[i];}
	   return ban(ss,j-1,count+1,key);
	}
	else{
	  for(int i=(len+1)/2+1;i<=len;i++)
	    { ss[j++]=s[i];
		}
		return ban(ss,j-1,count+1,key);
	}
}
int main()
{ int t;
  scanf("%d",&t);
  while(t--){
  	int key;
  	int n;
  	scanf("%d %d",&key,&n);
  	int s[100];
  	for(int i=1;i<=n;i++)
  	{ scanf("%d",&s[i]);
	  }
	int count=ban(s,n,1,key);
	if(count==-1)
	 printf("Not Found\n");
	else
	  printf("%d\n",count);
  }
  return 0;
}